#include <iomanip>
#include <iostream>

using namespace std;

int main() {
    int inp;
    double d;
    cout.setf(ios::fixed);
    cin >> d;
    while (d) {
        cout << setprecision(4) << d << " ";
        cin >> d;
    }
    cout << endl;
    cin >> d;
    while (d) {
        cout << scientific << setprecision(3) << d << " ";
        cin >> d;
    }
    cout << endl;
    cin >> inp;
    while (inp) {
        cout << oct << inp << " ";
        cin >> inp;
    }
    cout << endl;
    cin >> inp;
    while (inp) {
        cout << hex << inp << " ";
        cin >> inp;
    }
    cout << endl;
    int a[3][5];
    cout << dec;
    cout.setf(ios::fixed, ios::floatfield);
    for (int i = 0; i < 3; i++) {
        for (int j = 0; j < 5; j++) {
            cin >> a[i][j];
        }
    }
    for (int i = 0; i < 3; i++) {
        for (int j = 0; j < 5; j++) {
            cout << setw(6) << left << a[i][j] << " ";
        }
        cout << endl;
    }
}